Crate fuel_core_storage

Source
Expand description

The crate fuel-core-storage contains storage types, primitives, tables used by fuel-core. This crate doesn’t contain the actual implementation of the storage. It works around the Database and is used by services to provide a default implementation. Primitives defined here are used by services but are flexible enough to customize the logic when the Database is known.

Modules§

  • The module defines structures for the Mappable tables. Each table may have its blueprint that defines how it works with the storage. The table may have a plain blueprint that simply works in CRUD mode, or it may be an SMT-based blueprint that maintains a valid Merkle tree over the storage entries.
  • The module contains the traits for encoding and decoding the types(a.k.a Codec). It implements common codecs and encoders, but it is always possible to define own codecs.
  • The module defines the Column and default tables used by the current fuel-core codebase. In the future, the Column enum should contain only the required tables for the execution. All other tables should live in the downstream creates in the place where they are really used.
  • The module defines primitives that allow iterating of the storage.
  • The module provides plain abstract definition of the key-value store.
  • The module contains the StructuredStorage wrapper around the key-value storage that implements the storage traits for the tables with blueprint.
  • The module contains definition of storage tables used by default implementation of fuel services.
  • The primitives to work with storage in transactional mode.
  • The wrapper around the storage for VM implements non-storage getters.

Macros§

  • Creates StorageError::NotFound error with file and line information inside.

Structs§

Enums§

  • Error occurring during interaction with storage

Traits§

  • Storage operations for contract assets.
  • When this trait is implemented, the underlying interpreter is guaranteed to have full functionality
  • The helper trait to work with storage errors.
  • Mappable type with Key and Value.
  • Returns the merkle root for the StorageType per merkle Key. Per one storage, it is possible to have several merkle trees under different Key.
  • Storage requirements for predicates.
  • Helper trait for StorageMutate to provide user-friendly API to retrieve storage as mutable reference.
  • Helper trait for StorageInspect to provide user-friendly API to retrieve storage as reference.
  • The traits allow work with the storage in batches. Some implementations can perform batch operations faster than one by one.
  • Base read storage trait for Fuel infrastructure.
  • Base storage trait for Fuel infrastructure.
  • Base storage trait for Fuel infrastructure.
  • Base storage trait for Fuel infrastructure.
  • Base storage trait for Fuel infrastructure.

Type Aliases§